//
//  GlobalData.h
//  Youhu
//
//  Created by Eton on 2016/10/25.
//  Copyright © 2016年 ApeStar. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CommonModel.h"
@class LoginModel;

#define kGlobalData [GlobalData shared]

//App全局数据相关逻辑处理
@interface GlobalData : NSObject

@property (nonatomic, strong) CommonModel *commonData;

@property (nonatomic, assign) int announUnreadMessagesCount;//公告 消息未读数

@property (strong, nonatomic) NSDate * serviceDate;//服务器时间

+ (GlobalData *)shared;

#pragma mark - Public Method
//启动app，需配置的基本信息
- (void)setupAppBaseConfig;

////获取App基本数据
- (void)updateBaseData;

//获取用户账号信息
- (void)updateUserAccount;


#pragma mark - 登录逻辑
/**
 *  判断是否有登录
 *  未登录则进去登录页
 */
- (BOOL)isLogin;

//登录成功
- (void)loginSuccessWithRes:(LoginModel *)loginRes;

//退出登录
- (void)logoutWithFail:(ApeResponseError *)failureResponse;

@end
